#define DEBUG
#include <cstdio>
#define MAXN 200000

using namespace std;

int main() {
#ifdef DEBUG
  freopen("2.in", "r", stdin);
  freopen("2.out", "w", stdout);
#endif

  static int a[MAXN+1];
  int n, k, d;
  scanf("%d %d %d", &n, &k, &d);
  for (int i=1; i<=n; i++) {
    scanf("%d", a+i);
  }

  static int book[MAXN+1];
  int ansl=1, ansr=1;
  for (int i=1, j; i<=n; i++) {
    int first=a[i], last=a[i], empty=0;
    book[a[i]]=i;
    for (j=i+1; j<=n; j++) {
      if ((a[j]-first)%d || book[a[j]]==i) {
	break;
      }
      book[a[j]]=i;
      if (a[j]<first) {
	empty += (first-a[j])/d-1;
	first = a[j];
      } else if (first<=a[j] && last>=a[j]) {
	empty--;
      } else {
	empty += (a[j]-last)/d-1;
	last = a[j];
      }
      if (empty<=k) {
	if (j-i+1>ansr-ansl+1) {
	  ansl=i, ansr=j;
	}
      }
    }
  }
  
  printf("%d %d", ansl, ansr);

  fclose(stdin);
  fclose(stdout);
  return 0;
}
